{"ast":null,"code":"import _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport { render } from \"rc-util/es/React/render\";\nimport * as React from 'react';\nimport ConfigProvider, { globalConfig } from '../config-provider';\nimport PurePanel from './PurePanel';\nimport useMessage, { useInternalMessage } from './useMessage';\nimport { wrapPromiseFn } from './util';\nvar methods = ['success', 'info', 'warning', 'error', 'loading'];\nvar message = null;\nvar act = function act(callback) {\n  return callback();\n};\nvar taskQueue = [];\nvar defaultGlobalConfig = {};\nfunction getGlobalContext() {\n  var _defaultGlobalConfig = defaultGlobalConfig,\n    globalPrefixCls = _defaultGlobalConfig.prefixCls,\n    globalGetContainer = _defaultGlobalConfig.getContainer,\n    rtl = _defaultGlobalConfig.rtl,\n    maxCount = _defaultGlobalConfig.maxCount,\n    top = _defaultGlobalConfig.top;\n  var mergedPrefixCls = globalPrefixCls !== null && globalPrefixCls !== void 0 ? globalPrefixCls : globalConfig().getPrefixCls('message');\n  var mergedContainer = (globalGetContainer === null || globalGetContainer === void 0 ? void 0 : globalGetContainer()) || document.body;\n  return {\n    prefixCls: mergedPrefixCls,\n    container: mergedContainer,\n    rtl: rtl,\n    maxCount: maxCount,\n    top: top\n  };\n}\nvar GlobalHolder = /*#__PURE__*/React.forwardRef(function (_, ref) {\n  var _React$useState = React.useState(),\n    _React$useState2 = _slicedToArray(_React$useState, 2),\n    prefixCls = _React$useState2[0],\n    setPrefixCls = _React$useState2[1];\n  var _React$useState3 = React.useState(),\n    _React$useState4 = _slicedToArray(_React$useState3, 2),\n    container = _React$useState4[0],\n    setContainer = _React$useState4[1];\n  var _React$useState5 = React.useState(),\n    _React$useState6 = _slicedToArray(_React$useState5, 2),\n    maxCount = _React$useState6[0],\n    setMaxCount = _React$useState6[1];\n  var _React$useState7 = React.useState(),\n    _React$useState8 = _slicedToArray(_React$useState7, 2),\n    rtl = _React$useState8[0],\n    setRTL = _React$useState8[1];\n  var _React$useState9 = React.useState(),\n    _React$useState10 = _slicedToArray(_React$useState9, 2),\n    top = _React$useState10[0],\n    setTop = _React$useState10[1];\n  var _useInternalMessage = useInternalMessage({\n      prefixCls: prefixCls,\n      getContainer: function getContainer() {\n        return container;\n      },\n      maxCount: maxCount,\n      rtl: rtl,\n      top: top\n    }),\n    _useInternalMessage2 = _slicedToArray(_useInternalMessage, 2),\n    api = _useInternalMessage2[0],\n    holder = _useInternalMessage2[1];\n  var global = globalConfig();\n  var rootPrefixCls = global.getRootPrefixCls();\n  var rootIconPrefixCls = global.getIconPrefixCls();\n  var sync = function sync() {\n    var _getGlobalContext = getGlobalContext(),\n      nextGlobalPrefixCls = _getGlobalContext.prefixCls,\n      nextGlobalContainer = _getGlobalContext.container,\n      nextGlobalMaxCount = _getGlobalContext.maxCount,\n      nextGlobalRTL = _getGlobalContext.rtl,\n      nextTop = _getGlobalContext.top;\n    setPrefixCls(nextGlobalPrefixCls);\n    setContainer(nextGlobalContainer);\n    setMaxCount(nextGlobalMaxCount);\n    setRTL(nextGlobalRTL);\n    setTop(nextTop);\n  };\n  React.useEffect(sync, []);\n  React.useImperativeHandle(ref, function () {\n    var instance = Object.assign({}, api);\n    Object.keys(instance).forEach(function (method) {\n      instance[method] = function () {\n        sync();\n        return api[method].apply(api, arguments);\n      };\n    });\n    return {\n      instance: instance,\n      sync: sync\n    };\n  });\n  return /*#__PURE__*/React.createElement(ConfigProvider, {\n    prefixCls: rootPrefixCls,\n    iconPrefixCls: rootIconPrefixCls\n  }, holder);\n});\nfunction flushNotice() {\n  if (!message) {\n    var holderFragment = document.createDocumentFragment();\n    var newMessage = {\n      fragment: holderFragment\n    };\n    message = newMessage;\n    // Delay render to avoid sync issue\n    act(function () {\n      render( /*#__PURE__*/React.createElement(GlobalHolder, {\n        ref: function ref(node) {\n          var _ref = node || {},\n            instance = _ref.instance,\n            sync = _ref.sync;\n          // React 18 test env will throw if call immediately in ref\n          Promise.resolve().then(function () {\n            if (!newMessage.instance && instance) {\n              newMessage.instance = instance;\n              newMessage.sync = sync;\n              flushNotice();\n            }\n          });\n        }\n      }), holderFragment);\n    });\n    return;\n  }\n  // Notification not ready\n  if (!message.instance) {\n    return;\n  }\n  // >>> Execute task\n  taskQueue.forEach(function (task) {\n    var type = task.type,\n      skipped = task.skipped;\n    // Only `skipped` when user call notice but cancel it immediately\n    // and instance not ready\n    if (!skipped) {\n      switch (type) {\n        case 'open':\n          {\n            act(function () {\n              var closeFn = message.instance.open(Object.assign(Object.assign({}, defaultGlobalConfig), task.config));\n              closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);\n              task.setCloseFn(closeFn);\n            });\n            break;\n          }\n        case 'destroy':\n          act(function () {\n            message === null || message === void 0 ? void 0 : message.instance.destroy(task.key);\n          });\n          break;\n        // Other type open\n        default:\n          {\n            act(function () {\n              var _message$instance;\n              var closeFn = (_message$instance = message.instance)[type].apply(_message$instance, _toConsumableArray(task.args));\n              closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);\n              task.setCloseFn(closeFn);\n            });\n          }\n      }\n    }\n  });\n  // Clean up\n  taskQueue = [];\n}\nfunction setMessageGlobalConfig(config) {\n  defaultGlobalConfig = Object.assign(Object.assign({}, defaultGlobalConfig), config);\n  // Trigger sync for it\n  act(function () {\n    var _a;\n    (_a = message === null || message === void 0 ? void 0 : message.sync) === null || _a === void 0 ? void 0 : _a.call(message);\n  });\n}\nfunction open(config) {\n  var result = wrapPromiseFn(function (resolve) {\n    var closeFn;\n    var task = {\n      type: 'open',\n      config: config,\n      resolve: resolve,\n      setCloseFn: function setCloseFn(fn) {\n        closeFn = fn;\n      }\n    };\n    taskQueue.push(task);\n    return function () {\n      if (closeFn) {\n        act(function () {\n          closeFn();\n        });\n      } else {\n        task.skipped = true;\n      }\n    };\n  });\n  flushNotice();\n  return result;\n}\nfunction typeOpen(type, args) {\n  var result = wrapPromiseFn(function (resolve) {\n    var closeFn;\n    var task = {\n      type: type,\n      args: args,\n      resolve: resolve,\n      setCloseFn: function setCloseFn(fn) {\n        closeFn = fn;\n      }\n    };\n    taskQueue.push(task);\n    return function () {\n      if (closeFn) {\n        act(function () {\n          closeFn();\n        });\n      } else {\n        task.skipped = true;\n      }\n    };\n  });\n  flushNotice();\n  return result;\n}\nfunction destroy(key) {\n  taskQueue.push({\n    type: 'destroy',\n    key: key\n  });\n  flushNotice();\n}\nvar baseStaticMethods = {\n  open: open,\n  destroy: destroy,\n  config: setMessageGlobalConfig,\n  useMessage: useMessage,\n  _InternalPanelDoNotUseOrYouWillBeFired: PurePanel\n};\nvar staticMethods = baseStaticMethods;\nmethods.forEach(function (type) {\n  staticMethods[type] = function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    return typeOpen(type, args);\n  };\n});\n// ==============================================================================\n// ==                                   Test                                   ==\n// ==============================================================================\nvar noop = function noop() {};\n/** @private Only Work in test env */\n// eslint-disable-next-line import/no-mutable-exports\nexport var actWrapper = noop;\nif (process.env.NODE_ENV === 'test') {\n  actWrapper = function actWrapper(wrapper) {\n    act = wrapper;\n  };\n}\n/** @private Only Work in test env */\n// eslint-disable-next-line import/no-mutable-exports\nexport var actDestroy = noop;\nif (process.env.NODE_ENV === 'test') {\n  actDestroy = function actDestroy() {\n    message = null;\n  };\n}\nexport default staticMethods;","map":{"version":3,"names":["_toConsumableArray","render","React","ConfigProvider","globalConfig","PurePanel","useMessage","useInternalMessage","wrapPromiseFn","methods","message","act","callback","taskQueue","defaultGlobalConfig","getGlobalContext","globalPrefixCls","prefixCls","globalGetContainer","getContainer","rtl","maxCount","top","mergedPrefixCls","getPrefixCls","mergedContainer","document","body","container","GlobalHolder","forwardRef","_","ref","useState","setPrefixCls","setContainer","setMaxCount","setRTL","setTop","api","holder","global","rootPrefixCls","getRootPrefixCls","rootIconPrefixCls","getIconPrefixCls","sync","nextGlobalPrefixCls","nextGlobalContainer","nextGlobalMaxCount","nextGlobalRTL","nextTop","useEffect","useImperativeHandle","instance","Object","assign","keys","forEach","method","apply","arguments","createElement","iconPrefixCls","flushNotice","holderFragment","createDocumentFragment","newMessage","fragment","node","Promise","resolve","then","task","type","skipped","closeFn","open","config","setCloseFn","destroy","key","_message$instance","args","setMessageGlobalConfig","_a","call","result","fn","push","typeOpen","baseStaticMethods","_InternalPanelDoNotUseOrYouWillBeFired","staticMethods","_len","length","Array","_key","noop","actWrapper","process","env","NODE_ENV","wrapper","actDestroy"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/message/index.js"],"sourcesContent":["import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport { render } from \"rc-util/es/React/render\";\nimport * as React from 'react';\nimport ConfigProvider, { globalConfig } from '../config-provider';\nimport PurePanel from './PurePanel';\nimport useMessage, { useInternalMessage } from './useMessage';\nimport { wrapPromiseFn } from './util';\nconst methods = ['success', 'info', 'warning', 'error', 'loading'];\nlet message = null;\nlet act = callback => callback();\nlet taskQueue = [];\nlet defaultGlobalConfig = {};\nfunction getGlobalContext() {\n  const {\n    prefixCls: globalPrefixCls,\n    getContainer: globalGetContainer,\n    rtl,\n    maxCount,\n    top\n  } = defaultGlobalConfig;\n  const mergedPrefixCls = globalPrefixCls !== null && globalPrefixCls !== void 0 ? globalPrefixCls : globalConfig().getPrefixCls('message');\n  const mergedContainer = (globalGetContainer === null || globalGetContainer === void 0 ? void 0 : globalGetContainer()) || document.body;\n  return {\n    prefixCls: mergedPrefixCls,\n    container: mergedContainer,\n    rtl,\n    maxCount,\n    top\n  };\n}\nconst GlobalHolder = /*#__PURE__*/React.forwardRef((_, ref) => {\n  const [prefixCls, setPrefixCls] = React.useState();\n  const [container, setContainer] = React.useState();\n  const [maxCount, setMaxCount] = React.useState();\n  const [rtl, setRTL] = React.useState();\n  const [top, setTop] = React.useState();\n  const [api, holder] = useInternalMessage({\n    prefixCls,\n    getContainer: () => container,\n    maxCount,\n    rtl,\n    top\n  });\n  const global = globalConfig();\n  const rootPrefixCls = global.getRootPrefixCls();\n  const rootIconPrefixCls = global.getIconPrefixCls();\n  const sync = () => {\n    const {\n      prefixCls: nextGlobalPrefixCls,\n      container: nextGlobalContainer,\n      maxCount: nextGlobalMaxCount,\n      rtl: nextGlobalRTL,\n      top: nextTop\n    } = getGlobalContext();\n    setPrefixCls(nextGlobalPrefixCls);\n    setContainer(nextGlobalContainer);\n    setMaxCount(nextGlobalMaxCount);\n    setRTL(nextGlobalRTL);\n    setTop(nextTop);\n  };\n  React.useEffect(sync, []);\n  React.useImperativeHandle(ref, () => {\n    const instance = Object.assign({}, api);\n    Object.keys(instance).forEach(method => {\n      instance[method] = function () {\n        sync();\n        return api[method].apply(api, arguments);\n      };\n    });\n    return {\n      instance,\n      sync\n    };\n  });\n  return /*#__PURE__*/React.createElement(ConfigProvider, {\n    prefixCls: rootPrefixCls,\n    iconPrefixCls: rootIconPrefixCls\n  }, holder);\n});\nfunction flushNotice() {\n  if (!message) {\n    const holderFragment = document.createDocumentFragment();\n    const newMessage = {\n      fragment: holderFragment\n    };\n    message = newMessage;\n    // Delay render to avoid sync issue\n    act(() => {\n      render( /*#__PURE__*/React.createElement(GlobalHolder, {\n        ref: node => {\n          const {\n            instance,\n            sync\n          } = node || {};\n          // React 18 test env will throw if call immediately in ref\n          Promise.resolve().then(() => {\n            if (!newMessage.instance && instance) {\n              newMessage.instance = instance;\n              newMessage.sync = sync;\n              flushNotice();\n            }\n          });\n        }\n      }), holderFragment);\n    });\n    return;\n  }\n  // Notification not ready\n  if (!message.instance) {\n    return;\n  }\n  // >>> Execute task\n  taskQueue.forEach(task => {\n    const {\n      type,\n      skipped\n    } = task;\n    // Only `skipped` when user call notice but cancel it immediately\n    // and instance not ready\n    if (!skipped) {\n      switch (type) {\n        case 'open':\n          {\n            act(() => {\n              const closeFn = message.instance.open(Object.assign(Object.assign({}, defaultGlobalConfig), task.config));\n              closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);\n              task.setCloseFn(closeFn);\n            });\n            break;\n          }\n        case 'destroy':\n          act(() => {\n            message === null || message === void 0 ? void 0 : message.instance.destroy(task.key);\n          });\n          break;\n        // Other type open\n        default:\n          {\n            act(() => {\n              var _message$instance;\n              const closeFn = (_message$instance = message.instance)[type].apply(_message$instance, _toConsumableArray(task.args));\n              closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);\n              task.setCloseFn(closeFn);\n            });\n          }\n      }\n    }\n  });\n  // Clean up\n  taskQueue = [];\n}\nfunction setMessageGlobalConfig(config) {\n  defaultGlobalConfig = Object.assign(Object.assign({}, defaultGlobalConfig), config);\n  // Trigger sync for it\n  act(() => {\n    var _a;\n    (_a = message === null || message === void 0 ? void 0 : message.sync) === null || _a === void 0 ? void 0 : _a.call(message);\n  });\n}\nfunction open(config) {\n  const result = wrapPromiseFn(resolve => {\n    let closeFn;\n    const task = {\n      type: 'open',\n      config,\n      resolve,\n      setCloseFn: fn => {\n        closeFn = fn;\n      }\n    };\n    taskQueue.push(task);\n    return () => {\n      if (closeFn) {\n        act(() => {\n          closeFn();\n        });\n      } else {\n        task.skipped = true;\n      }\n    };\n  });\n  flushNotice();\n  return result;\n}\nfunction typeOpen(type, args) {\n  const result = wrapPromiseFn(resolve => {\n    let closeFn;\n    const task = {\n      type,\n      args,\n      resolve,\n      setCloseFn: fn => {\n        closeFn = fn;\n      }\n    };\n    taskQueue.push(task);\n    return () => {\n      if (closeFn) {\n        act(() => {\n          closeFn();\n        });\n      } else {\n        task.skipped = true;\n      }\n    };\n  });\n  flushNotice();\n  return result;\n}\nfunction destroy(key) {\n  taskQueue.push({\n    type: 'destroy',\n    key\n  });\n  flushNotice();\n}\nconst baseStaticMethods = {\n  open,\n  destroy,\n  config: setMessageGlobalConfig,\n  useMessage,\n  _InternalPanelDoNotUseOrYouWillBeFired: PurePanel\n};\nconst staticMethods = baseStaticMethods;\nmethods.forEach(type => {\n  staticMethods[type] = function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    return typeOpen(type, args);\n  };\n});\n// ==============================================================================\n// ==                                   Test                                   ==\n// ==============================================================================\nconst noop = () => {};\n/** @private Only Work in test env */\n// eslint-disable-next-line import/no-mutable-exports\nexport let actWrapper = noop;\nif (process.env.NODE_ENV === 'test') {\n  actWrapper = wrapper => {\n    act = wrapper;\n  };\n}\n/** @private Only Work in test env */\n// eslint-disable-next-line import/no-mutable-exports\nexport let actDestroy = noop;\nif (process.env.NODE_ENV === 'test') {\n  actDestroy = () => {\n    message = null;\n  };\n}\nexport default staticMethods;"],"mappings":";AAAA,OAAOA,kBAAkB,MAAM,8CAA8C;AAC7E,SAASC,MAAM,QAAQ,yBAAyB;AAChD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,cAAc,IAAIC,YAAY,QAAQ,oBAAoB;AACjE,OAAOC,SAAS,MAAM,aAAa;AACnC,OAAOC,UAAU,IAAIC,kBAAkB,QAAQ,cAAc;AAC7D,SAASC,aAAa,QAAQ,QAAQ;AACtC,IAAMC,OAAO,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC;AAClE,IAAIC,OAAO,GAAG,IAAI;AAClB,IAAIC,GAAG,GAAG,aAAAC,QAAQ;EAAA,OAAIA,QAAQ,EAAE;AAAA;AAChC,IAAIC,SAAS,GAAG,EAAE;AAClB,IAAIC,mBAAmB,GAAG,CAAC,CAAC;AAC5B,SAASC,gBAAgB,GAAG;EAC1B,2BAMID,mBAAmB;IALVE,eAAe,wBAA1BC,SAAS;IACKC,kBAAkB,wBAAhCC,YAAY;IACZC,GAAG,wBAAHA,GAAG;IACHC,QAAQ,wBAARA,QAAQ;IACRC,GAAG,wBAAHA,GAAG;EAEL,IAAMC,eAAe,GAAGP,eAAe,KAAK,IAAI,IAAIA,eAAe,KAAK,KAAK,CAAC,GAAGA,eA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